#
# Be sure to run `pod lib lint HCSDK_iOS.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = 'HCSDK_iOS'
  s.version          = '0.99.32'
  s.summary          = 'A short description of HCSDK_iOS.'

# This description is used to generate tags and improve search results.
#   * Think: What does it do? Why did you write it? What is the focus?
#   * Try to keep it short, snappy and to the point.
#   * Write the description between the DESC delimiters below.
#   * Finally, don't worry about the indent, CocoaPods strips it!

  s.description      = <<-DESC
TODO: Add long description of the pod here.
                       DESC

  s.homepage         = 'https://github.com/chenzhen/HCSDK_iOS'
  # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
  s.license          = { :type => 'MIT', :file => 'LICENSE' }
  s.author           = { 'chenzhen' => 'chenzhen@huicheng.cn' }
  s.source           = { :git => 'https://github.com/chenzhen/HCSDK_iOS.git', :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.ios.deployment_target = '15.0'

  #s.source_files = 'HCSDK_iOS/Classes/**/*'
  s.vendored_frameworks = ['HCSDK_iOS/Frameworks/**/*.framework']
  
  # 设置 C++ 标准库和语言标准
  s.pod_target_xcconfig = {
    'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17', # 可以根据需要选择 c++11, c++14, c++17 等
    'CLANG_CXX_LIBRARY' => 'libc++'        # 使用 libc++ 作为 C++ 标准库
  }

  # s.resource_bundles = {
  #   'HCSDK_iOS' => ['HCSDK_iOS/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
  
  s.subspec 'Common' do |p|
    p.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCCommon.framework']
    s.dependency 'SQLite.swift', '~> 0.13.0'
  end
  
  s.subspec 'Auth' do |a|
    a.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCAuth.framework']
  end
  
  s.subspec 'PsyAlgorithm' do |psy|
    psy.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCPsyAlgorithm.framework']
  end
  
  s.subspec 'Bio' do |bio|
      bio.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCBio.framework']
      bio.dependency "HCSDK_iOS/PsyAlgorithm"
  end
  
  s.subspec 'Player' do |p|
    p.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCAudioPlayer.framework']
    p.dependency "HCSDK_iOS/Assets"
    p.dependency "HCSDK_iOS/Common"
  end
  
  s.subspec 'Assets' do |as|
    as.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCAssets.framework']
    as.dependency "HCSDK_iOS/Auth"
    as.dependency "HCSDK_iOS/Common"
    as.dependency "ZIPFoundation"
  end
  
  s.subspec 'Schedule' do |sc|
    sc.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCSchedule.framework']
    sc.dependency "HCSDK_iOS/Auth"
  end
  
  s.subspec 'Therapy' do |t|
    t.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCTherapy.framework']
    t.dependency "HCSDK_iOS/Auth"
    t.dependency "HCSDK_iOS/Common"
    t.dependency "HCSDK_iOS/Player"
  end
  
  s.subspec 'Log' do |t|
    t.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCLog.framework']
    t.dependency "HCSDK_iOS/Auth"
    t.dependency "HCSDK_iOS/Player"
    t.dependency "HCSDK_iOS/Therapy"
    t.dependency "HCSDK_iOS/Common"
  end
  
  s.subspec 'SDK' do |sdk|
    sdk.vendored_frameworks = ['HCSDK_iOS/Frameworks/HCSDK.framework']
    sdk.dependency "HCSDK_iOS/Auth"
    sdk.dependency "HCSDK_iOS/Common"
    sdk.dependency "HCSDK_iOS/Therapy"
    sdk.dependency "HCSDK_iOS/Assets"
    sdk.dependency "HCSDK_iOS/Bio"
  end
end
